package com.lq.educationsystem.examination.entiy;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName examination_tb
 */
@Data
public class ExaminationTb implements Serializable {
    /**
     * 考试id
     */
    private Integer examinationId;

    /**
     * 考场id
     */
    private String examinationName;

    /**
     * 课程id
     */
    private Integer subjectId;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ExaminationTb other = (ExaminationTb) that;
        return (this.getExaminationId() == null ? other.getExaminationId() == null : this.getExaminationId().equals(other.getExaminationId()))
            && (this.getExaminationName() == null ? other.getExaminationName() == null : this.getExaminationName().equals(other.getExaminationName()))
            && (this.getSubjectId() == null ? other.getSubjectId() == null : this.getSubjectId().equals(other.getSubjectId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getExaminationId() == null) ? 0 : getExaminationId().hashCode());
        result = prime * result + ((getExaminationName() == null) ? 0 : getExaminationName().hashCode());
        result = prime * result + ((getSubjectId() == null) ? 0 : getSubjectId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", examinationId=").append(examinationId);
        sb.append(", examinationName=").append(examinationName);
        sb.append(", subjectId=").append(subjectId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}